<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>添加标签</title>
  <link rel="stylesheet" href="../../../layui/css/layui.css">
  <script src="../../../layui/layui.js"></script>
    <script type="text/javascript" src="../../../js/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="../../../js/main.js"></script>
</head>
<style type="text/css">
 body{
  height: 100%;
  width: 100%;
 }
 .layui-form-label{width: 130px}
 .btn {
    background-color: #e5e5e5;
    background-image: none;
    filter: none;
    border: 0;
    padding: 7px 14px;
    text-shadow: none;
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #333333;
    cursor: pointer;
    outline: none;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    box-shadow: none !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
    border-radius: 0 !important;
}
.layui-input-inline{width: 214px !important}


</style>

<body>
 <!-- 内容主体区域 -->
 <div class="x-body layui-anim layui-anim-up">
  <div class="layui-fluid">
  
    <form class="layui-form layui-form-pane1" lay-filter="first">
        <div class="layui-form-item">
        </div>
      <div class="layui-form-item">
         <label class="layui-form-label"><span class="text-error">*</span>标签名：</label>
         <div class="layui-input-inline">
          <input name="tagName" id="tagName" placeholder="请输入标签名" value="" class="layui-input">
          </div>
      </div>


        <div class="layui-form-item" style="margin-left: 140px;">
            <!--<p id="btnGroup" class="pull-right">-->
                <button class="layui-btn save"  lay-submit="" lay-filter="*">保存</button>
                <button class="layui-btn quxiao" >取消</button>
            <!--</p>-->
        </div>


        <input name="recordType" id="recordType"  value="1" type="hidden"  class="layui-input">


    </form>
  </div>
  </div>
  </body>
  </html>
<script type="text/javascript">

    //重新渲染表单

    function renderForm(){

        layui.use('form', function(){

            var form = layui.form;
            form.render();

        });

    }









    layui.use(['element', 'layer', 'jquery','form','laydate','upload'], function () {
	  var form = layui.form;
	  var $ = layui.jquery;
	  var laydate=layui.laydate;
	  /* function quxiao(){
	  	alert(111);
	  } */
	   var $ = layui.jquery,
	   upload = layui.upload;

	  form.on('submit(*)', function(data){
	  	console.log(data.field);
	  	if(data.field.door2Door=='on'){
            data.field.door2Door = true;
        }else{
            data.field.door2Door = false;
        }

           var url = '/hy/basic/member/addTag';



	    $.ajax({
	    	type:'POST',
            url:url,
	    	data: data.field,
	    	success: function(data){
                alert("操作成功！");
    			window.parent.location.reload(); //刷新父页面
				var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
				parent.layer.close(index);  // 关闭layer
	    		/* alert("操作成功");
	    		if(type=="update"){
		    		window.parent.location.reload(); //刷新父页面
					var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
					parent.layer.close(index);  // 关闭layer
	    		}else{
	    			window.location.reload();
	    			//window.location.href="${basePath}ryOrderConfig/queryList";
	    		} */
		    	
	    	//window.location.href="${basePath}ryOrderConfig/queryList";
	    	},
	    	error:function(data){
	    		alert("操作失败");
	    		console.log(data);
	    	}
	    })
	    return false;
	  });

})


</script>  